\(\int \frac {\cosh (a+\frac {b}{x^2})}{x^2} \, dx\) [32]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 12, antiderivative size = 57 \[ \int \frac {\cosh \left (a+\frac {b}{x^2}\right )}{x^2} \, dx=-\frac {e^{-a} \sqrt {\pi } \text {erf}\left (\frac {\sqrt {b}}{x}\right )}{4 \sqrt {b}}-\frac {e^a \sqrt {\pi } \text {erfi}\left (\frac {\sqrt {b}}{x}\right )}{4 \sqrt {b}} \]

[Out]

-1/4*erf(b^(1/2)/x)*Pi^(1/2)/exp(a)/b^(1/2)-1/4*exp(a)*erfi(b^(1/2)/x)*Pi^(1/2)/b^(1/2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5455, 5407, 2235, 2236} \[ \int \frac {\cosh \left (a+\frac {b}{x^2}\right )}{x^2} \, dx=-\frac {\sqrt {\pi } e^{-a} \text {erf}\left (\frac {\sqrt {b}}{x}\right )}{4 \sqrt {b}}-\frac {\sqrt {\pi } e^a \text {erfi}\left (\frac {\sqrt {b}}{x}\right )}{4 \sqrt {b}} \]

[In]

Int[Cosh[a + b/x^2]/x^2,x]

[Out]

-1/4*(Sqrt[Pi]*Erf[Sqrt[b]/x])/(Sqrt[b]*E^a) - (E^a*Sqrt[Pi]*Erfi[Sqrt[b]/x])/(4*Sqrt[b])

Rule 2235

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2
]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2236

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erf[(c + d*x)*Rt[(-b)*Log[F],
 2]]/(2*d*Rt[(-b)*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rule 5407

Int[Cosh[(c_.) + (d_.)*(x_)^(n_)], x_Symbol] :> Dist[1/2, Int[E^(c + d*x^n), x], x] + Dist[1/2, Int[E^(-c - d*
x^n), x], x] /; FreeQ[{c, d}, x] && IGtQ[n, 1]

Rule 5455

Int[((a_.) + Cosh[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> -Subst[Int[(a + b*Cosh[c + d/
x^n])^p/x^(m + 2), x], x, 1/x] /; FreeQ[{a, b, c, d}, x] && IntegerQ[p] && ILtQ[n, 0] && IntegerQ[m]

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \cosh \left (a+b x^2\right ) \, dx,x,\frac {1}{x}\right ) \\ & = -\left (\frac {1}{2} \text {Subst}\left (\int e^{-a-b x^2} \, dx,x,\frac {1}{x}\right )\right )-\frac {1}{2} \text {Subst}\left (\int e^{a+b x^2} \, dx,x,\frac {1}{x}\right ) \\ & = -\frac {e^{-a} \sqrt {\pi } \text {erf}\left (\frac {\sqrt {b}}{x}\right )}{4 \sqrt {b}}-\frac {e^a \sqrt {\pi } \text {erfi}\left (\frac {\sqrt {b}}{x}\right )}{4 \sqrt {b}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.86 \[ \int \frac {\cosh \left (a+\frac {b}{x^2}\right )}{x^2} \, dx=-\frac {\sqrt {\pi } \left (\text {erf}\left (\frac {\sqrt {b}}{x}\right ) (\cosh (a)-\sinh (a))+\text {erfi}\left (\frac {\sqrt {b}}{x}\right ) (\cosh (a)+\sinh (a))\right )}{4 \sqrt {b}} \]

[In]

Integrate[Cosh[a + b/x^2]/x^2,x]

[Out]

-1/4*(Sqrt[Pi]*(Erf[Sqrt[b]/x]*(Cosh[a] - Sinh[a]) + Erfi[Sqrt[b]/x]*(Cosh[a] + Sinh[a])))/Sqrt[b]

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.77

method result size
risch \(-\frac {\operatorname {erf}\left (\frac {\sqrt {b}}{x}\right ) \sqrt {\pi }\, {\mathrm e}^{-a}}{4 \sqrt {b}}-\frac {{\mathrm e}^{a} \sqrt {\pi }\, \operatorname {erf}\left (\frac {\sqrt {-b}}{x}\right )}{4 \sqrt {-b}}\) \(44\)
meijerg \(\frac {i \sqrt {\pi }\, \cosh \left (a \right ) \sqrt {2}\, \sqrt {i b}\, \left (\frac {\sqrt {i b}\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {b}}{x}\right )}{2 \sqrt {b}}+\frac {\sqrt {i b}\, \sqrt {2}\, \operatorname {erfi}\left (\frac {\sqrt {b}}{x}\right )}{2 \sqrt {b}}\right )}{4 b}+\frac {\sqrt {\pi }\, \sinh \left (a \right ) \sqrt {2}\, \sqrt {i b}\, \left (-\frac {\left (i b \right )^{\frac {3}{2}} \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {b}}{x}\right )}{2 b^{\frac {3}{2}}}+\frac {\left (i b \right )^{\frac {3}{2}} \sqrt {2}\, \operatorname {erfi}\left (\frac {\sqrt {b}}{x}\right )}{2 b^{\frac {3}{2}}}\right )}{4 b}\) \(131\)

[In]

int(cosh(a+b/x^2)/x^2,x,method=_RETURNVERBOSE)

[Out]

-1/4*erf(b^(1/2)/x)*Pi^(1/2)/exp(a)/b^(1/2)-1/4*exp(a)*Pi^(1/2)/(-b)^(1/2)*erf((-b)^(1/2)/x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.93 \[ \int \frac {\cosh \left (a+\frac {b}{x^2}\right )}{x^2} \, dx=\frac {\sqrt {\pi } \sqrt {-b} {\left (\cosh \left (a\right ) + \sinh \left (a\right )\right )} \operatorname {erf}\left (\frac {\sqrt {-b}}{x}\right ) - \sqrt {\pi } \sqrt {b} {\left (\cosh \left (a\right ) - \sinh \left (a\right )\right )} \operatorname {erf}\left (\frac {\sqrt {b}}{x}\right )}{4 \, b} \]

[In]

integrate(cosh(a+b/x^2)/x^2,x, algorithm="fricas")

[Out]

1/4*(sqrt(pi)*sqrt(-b)*(cosh(a) + sinh(a))*erf(sqrt(-b)/x) - sqrt(pi)*sqrt(b)*(cosh(a) - sinh(a))*erf(sqrt(b)/
x))/b

Sympy [F]

\[ \int \frac {\cosh \left (a+\frac {b}{x^2}\right )}{x^2} \, dx=\int \frac {\cosh {\left (a + \frac {b}{x^{2}} \right )}}{x^{2}}\, dx \]

[In]

integrate(cosh(a+b/x**2)/x**2,x)

[Out]

Integral(cosh(a + b/x**2)/x**2, x)

Maxima [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.11 \[ \int \frac {\cosh \left (a+\frac {b}{x^2}\right )}{x^2} \, dx=\frac {1}{2} \, b {\left (\frac {e^{\left (-a\right )} \Gamma \left (\frac {3}{2}, \frac {b}{x^{2}}\right )}{x^{3} \left (\frac {b}{x^{2}}\right )^{\frac {3}{2}}} - \frac {e^{a} \Gamma \left (\frac {3}{2}, -\frac {b}{x^{2}}\right )}{x^{3} \left (-\frac {b}{x^{2}}\right )^{\frac {3}{2}}}\right )} - \frac {\cosh \left (a + \frac {b}{x^{2}}\right )}{x} \]

[In]

integrate(cosh(a+b/x^2)/x^2,x, algorithm="maxima")

[Out]

1/2*b*(e^(-a)*gamma(3/2, b/x^2)/(x^3*(b/x^2)^(3/2)) - e^a*gamma(3/2, -b/x^2)/(x^3*(-b/x^2)^(3/2))) - cosh(a +
b/x^2)/x

Giac [F]

\[ \int \frac {\cosh \left (a+\frac {b}{x^2}\right )}{x^2} \, dx=\int { \frac {\cosh \left (a + \frac {b}{x^{2}}\right )}{x^{2}} \,d x } \]

[In]

integrate(cosh(a+b/x^2)/x^2,x, algorithm="giac")

[Out]

integrate(cosh(a + b/x^2)/x^2, x)

Mupad [F(-1)]

Timed out. \[ \int \frac {\cosh \left (a+\frac {b}{x^2}\right )}{x^2} \, dx=\int \frac {\mathrm {cosh}\left (a+\frac {b}{x^2}\right )}{x^2} \,d x \]

[In]

int(cosh(a + b/x^2)/x^2,x)

[Out]

int(cosh(a + b/x^2)/x^2, x)